Skip to content

Conversation

@Kronos3
Copy link
Collaborator

@Kronos3 Kronos3 commented Oct 22, 2025

This PR implements topology port semantics according to the spec from #748

Interesting Changes

  • Topology uses and component instance uses were merged into a single interfaceInstanceUse
  • The component's portMap + specialPortMap were moved out into a separate PortInterface construct so that it could be reused inside topology
  • A new port instance case class was added PortInstance.Topology for wrapping ports with a new name to impement topology ports.
  • SpecLoc.Instance (was for component instance) and SpecLoc.Topology was merged into SpecLoc.Instance (interface instance). (This required a spec update).

Closes #745

@Kronos3 Kronos3 marked this pull request as ready for review October 23, 2025 04:51
@Kronos3 Kronos3 requested a review from bocchino October 30, 2025 17:30
loc: Location // The location whether the connection is requested
): Result.Result[Unit] = Right(())

override def equals(obj: Any): Boolean =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to override equals here? What happens if we use the default equals?

Copy link
Collaborator Author

@Kronos3 Kronos3 Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required because we need a slightly more permissive == compared to default. This is so that we can compute port interfaces as sets of port instances. The default rule will also check the node.id which is not relevant for port instance but just for error reporting.

Copy link
Collaborator

@bocchino bocchino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I just have a few comments/questions about error messages and coding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants